﻿using _2DGame_Preview_Server.Services.RoomAndBattle.RoomHall.Model;
using Assets.Script.NetSystem.Services.HallService;
using Newtonsoft.Json;
using Script.UiSystem.Hall;
using SimpleTools.Json;

namespace Assets.Script.NetSystem.Services.RoomAndBattle.HallService.Handler
{
    public class NewRoom : IHallHandler
    {
        public void Handler(HallClient hallClient, JsonData jsonData)
        {
            RoomInfo info = JsonConvert.DeserializeObject<RoomInfo>(jsonData.GetStr("info"));
            
            HallController.Instance.NewRoom(info);
        }
    }
}